package com.hgyc.mom.wms.enums;

/**
 * 采购订单状态字典类
 * 自动生成的枚举类，请勿手动修改

 * @author fwj
 * @since 2025-09-23 15:29:41
 * @version 1.0
 **/
public enum PurchaseOrderStatusEnum {
    PREPARE("prepare", "草稿"),
    APPROVING("approving", "审批中"),
    APPROVED("approved", "已审批"),
    RECEIVE("receive", "部分接收"),
    FINISHED("finished", "已完成"),
    CLOSED("closed", "已关闭")
    ;

    private final String value;
    private final String label;

    PurchaseOrderStatusEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return this.value;
    }

    public String getLabel() {
        return this.label;
    }

    public static PurchaseOrderStatusEnum of(String value) {
        if (value == null) {
            return null;
        }
        for (PurchaseOrderStatusEnum item : PurchaseOrderStatusEnum.values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.label;
    }
}

